using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Export Associations</para>
    /// <para>Exports associations from a utility network to a comma-separated-values file (.csv). 
    /// This tool can be used in conjunction with the Import Associations tool.</para>
    /// <para>将公共设施网络中的关联导出到逗号分隔值文件 （.csv）。
    /// 此工具可与导入关联工具结合使用。</para>
    /// </summary>    
    [DisplayName("Export Associations")]
    public class ExportAssociations : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportAssociations()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network containing the associations to export.</para>
        /// <para>包含要导出的关联的公共设施网络。</para>
        /// </param>
        /// <param name="_association_type">
        /// <para>Association Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association to export.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All association types in the utility network will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—Connectivity associations allowing two junction subtypes to connect via a connectivity association (features are offset geometrically) will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Containment—The containment association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Attachment—The structural attachment association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (from side of edge)—The junction-edge (from side of edge) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (midspan)—The junction-edge (midspan) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (to side of edge)—The junction-edge (to side of edge) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要导出的关联类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—公共设施网络中的所有关联类型都将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—允许两个交汇点子类型通过连通性关联进行连通性关联（要素在几何上偏移）将导出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>包含 - 包含关联类型将导出到 .csv 文件。</bullet_item><para/>
        ///     <bullet_item>附件 （Attachment） - 结构附件关联类型将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（从边的一侧）—交汇点-边（从边的侧）连通性关联类型将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（跨度中）—交汇点-边（跨中跨）连通性关联类型将导出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（到边的一侧）- 交汇点-边（到边的一侧）连接关联类型将导出到.csv文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_csv_file">
        /// <para>Output  File</para>
        /// <para>The name and location of the .csv file that will be generated.</para>
        /// <para>将生成的 .csv 文件的名称和位置。</para>
        /// </param>
        public ExportAssociations(object _in_utility_network, _association_type_value? _association_type, object _out_csv_file)
        {
            this._in_utility_network = _in_utility_network;
            this._association_type = _association_type;
            this._out_csv_file = _out_csv_file;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Export Associations";

        public override string CallName => "un.ExportAssociations";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _association_type.GetGPValue(), _out_csv_file];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network containing the associations to export.</para>
        /// <para>包含要导出的关联的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Association Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of association to export.</para>
        ///   <bulletList>
        ///     <bullet_item>All—All association types in the utility network will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-junction connectivity—Connectivity associations allowing two junction subtypes to connect via a connectivity association (features are offset geometrically) will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Containment—The containment association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Attachment—The structural attachment association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (from side of edge)—The junction-edge (from side of edge) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (midspan)—The junction-edge (midspan) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///     <bullet_item>Junction-edge connectivity (to side of edge)—The junction-edge (to side of edge) connectivity association type will be exported to a .csv file.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要导出的关联类型。</para>
        ///   <bulletList>
        ///     <bullet_item>全部—公共设施网络中的所有关联类型都将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-交汇点连通性—允许两个交汇点子类型通过连通性关联进行连通性关联（要素在几何上偏移）将导出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>包含 - 包含关联类型将导出到 .csv 文件。</bullet_item><para/>
        ///     <bullet_item>附件 （Attachment） - 结构附件关联类型将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（从边的一侧）—交汇点-边（从边的侧）连通性关联类型将输出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（跨度中）—交汇点-边（跨中跨）连通性关联类型将导出到.csv文件。</bullet_item><para/>
        ///     <bullet_item>交汇点-边连通性（到边的一侧）- 交汇点-边（到边的一侧）连接关联类型将导出到.csv文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Association Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _association_type_value? _association_type { get; set; }

        public enum _association_type_value
        {
            /// <summary>
            /// <para>All</para>
            /// <para>All—All association types in the utility network will be exported to a .csv file.</para>
            /// <para>全部—公共设施网络中的所有关联类型都将输出到.csv文件。</para>
            /// </summary>
            [Description("All")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>Junction-junction connectivity</para>
            /// <para>Junction-junction connectivity—Connectivity associations allowing two junction subtypes to connect via a connectivity association (features are offset geometrically) will be exported to a .csv file.</para>
            /// <para>交汇点-交汇点连通性—允许两个交汇点子类型通过连通性关联进行连通性关联（要素在几何上偏移）将导出到.csv文件。</para>
            /// </summary>
            [Description("Junction-junction connectivity")]
            [GPEnumValue("JUNCTION_JUNCTION_CONNECTIVITY")]
            _JUNCTION_JUNCTION_CONNECTIVITY,

            /// <summary>
            /// <para>Containment</para>
            /// <para>Containment—The containment association type will be exported to a .csv file.</para>
            /// <para>包含 - 包含关联类型将导出到 .csv 文件。</para>
            /// </summary>
            [Description("Containment")]
            [GPEnumValue("CONTAINMENT")]
            _CONTAINMENT,

            /// <summary>
            /// <para>Attachment</para>
            /// <para>Attachment—The structural attachment association type will be exported to a .csv file.</para>
            /// <para>附件 （Attachment） - 结构附件关联类型将输出到.csv文件。</para>
            /// </summary>
            [Description("Attachment")]
            [GPEnumValue("STRUCTURAL_ATTACHMENT")]
            _STRUCTURAL_ATTACHMENT,

            /// <summary>
            /// <para>Junction-edge connectivity (from side of edge)</para>
            /// <para>Junction-edge connectivity (from side of edge)—The junction-edge (from side of edge) connectivity association type will be exported to a .csv file.</para>
            /// <para>交汇点-边连通性（从边的一侧）—交汇点-边（从边的侧）连通性关联类型将输出到.csv文件。</para>
            /// </summary>
            [Description("Junction-edge connectivity (from side of edge)")]
            [GPEnumValue("JUNCTION_EDGE_FROM_CONNECTIVITY")]
            _JUNCTION_EDGE_FROM_CONNECTIVITY,

            /// <summary>
            /// <para>Junction-edge connectivity (midspan)</para>
            /// <para>Junction-edge connectivity (midspan)—The junction-edge (midspan) connectivity association type will be exported to a .csv file.</para>
            /// <para>交汇点-边连通性（跨度中）—交汇点-边（跨中跨）连通性关联类型将导出到.csv文件。</para>
            /// </summary>
            [Description("Junction-edge connectivity (midspan)")]
            [GPEnumValue("JUNCTION_EDGE_MIDSPAN_CONNECTIVITY")]
            _JUNCTION_EDGE_MIDSPAN_CONNECTIVITY,

            /// <summary>
            /// <para>Junction-edge connectivity (to side of edge)</para>
            /// <para>Junction-edge connectivity (to side of edge)—The junction-edge (to side of edge) connectivity association type will be exported to a .csv file.</para>
            /// <para>交汇点-边连通性（到边的一侧）- 交汇点-边（到边的一侧）连接关联类型将导出到.csv文件。</para>
            /// </summary>
            [Description("Junction-edge connectivity (to side of edge)")]
            [GPEnumValue("JUNCTION_EDGE_TO_CONNECTIVITY")]
            _JUNCTION_EDGE_TO_CONNECTIVITY,

        }

        /// <summary>
        /// <para>Output  File</para>
        /// <para>The name and location of the .csv file that will be generated.</para>
        /// <para>将生成的 .csv 文件的名称和位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output  File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_csv_file { get; set; }


        public ExportAssociations SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}